#  Copyright (c) 2022. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
#  Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
#  Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
#  Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
#  Vestibulum commodo. Ut rhoncus gravida arcu.

# coding:utf8

from selenium.webdriver.common.by import By




# -------------------------------------------------------------
# Locators  Login
# -------------------------------------------------------------

class LocalLogin(object):
    frame = None
    frame_name = (By.CSS_SELECTOR, 'frameset')
    username = (By.ID, 'username')
    password = (By.ID, 'password')
    selectbox = (By.ID, 'langSelect')
    check = (By.ID, "saveLanguage")
    submit = (By.ID, 'logonButton')

# -------------------------------------------------------------
#Locators MainPage
# top_curTitle
# -------------------------------------------------------------

    
class LocalMainLeft:
    frame = "menu"
    system = (By.ID, "XSTR_WEB_MENU_SYSTEM")
    wangluo = (By.ID, "XSTR_WZD_NET")
    xianlu = (By.ID, "XSTR_LBL_LINE")
    duijiang = (By.ID, "XSTR_HLP_SETTING_PHONE")
    
class LocalMainTOp:
    frame = "title_top"
    tab_config = (By.LINK_TEXT, '系统配置')  # 系统配置 - 页按钮
    tab_update = (By.LINK_TEXT, '升级')   # 页按钮 - 升级
    zhuxiao = (By.XPATH, '/html/body/div[1]/table/tbody/tr[1]/td[4]/form/input')
    
    class DuiJiang:
        tab_meiti = (By.LINK_TEXT, '媒体设置')  # 媒体设置 页按钮
        tab_camera = (By.LINK_TEXT, '相机设置')  # 相机设置 页按钮
        
        # pass
    
class LocalMainContain:
    frame = "main"
    class Meiti:
        meiti_ = (By.ID, "XSTR_LBL_GEN_MEDIA")
        select_dis = (By.ID, "disable_state")
        select_open = (By.ID, "enable_state")
        
        # btn_left = (By.CLASS_NAME, "width5rem")
        btn_right = (By.XPATH, '//*[@id="isSupportLineoutEnableAndDisable"]/td[2]/table/tbody/tr[1]/td/input')
        btn_left = (By.XPATH, '//*[@id="isSupportLineoutEnableAndDisable"]/td[2]/table/tbody/tr[2]/td/input')
        # btn_right = (By.CLASS_NAME, "width5rem")
        btn_accept = (By.XPATH, "/html/body/div[1]/div[2]/form/div[11]/table/tbody/tr/td[2]/input[1]")
    
    class Config:
        # btn_select = (By.XPATH, '//*[@id="System"]')
        btn_select = (By.NAME, 'CONFIG')
        
        # daoru btn  ok
        btn_daoru = (By.XPATH, '//*[@id="ImportBody"]/table/tbody/tr/td[5]/input')
        # btn_daoru = (By.NAME, 'WebUpdate')
        
        input_text = (By.NAME, 'show_select_file')
        
        # btn
        # btn = (By.CLASS_NAME, 'btninput_l lit_btninput')
        btn = (By.XPATH, '//*[@id="ImportBody"]/table/tbody/tr/td[4]/input[3]')
        
        
class LocalMainVerson:
    frame = "footer"
    version = (By.XPATH, '/html/body/div/text()')
    


# class BaiduPageLocators(object):
#     # input = (By.ID, 'kw')
#     logo = (By.ID, 's_mp')
#     news_lab = (By.CLASS_NAME, 'mnav c-font-normal c-color-t')
#     btn_baidu = (By.ID, "s_btn_wr")
#     input = (By.CLASS_NAME, "s_ipt")
#     some = (By.NAME, "tj_briicon")
#     btn_search = (By.CLASS_NAME, 'bg s_btn')